Skip to content

Conversation

@ASingaley
Copy link

PR Description

Summary

This PR introduces new custom errors for the LiquidityManager contract and makes adjustments to its function parameters for improved clarity and safety.

What's New

  • Custom Errors Added

    • LiquidityManager__InvalidAmount
    • LiquidityManager__InsufficientLiquidity
    • LiquidityManager__ThresholdAlreadyMet
    • LiquidityManager__VestingAlreadySet
  • LiquidityManager Updates

    • Cleaned up unused parameters in addLiquidity.
    • Improved readability and developer feedback through structured error handling.

Why

Using custom errors reduces gas costs compared to require strings and provides more descriptive, explicit failure cases.
Refactoring LiquidityManager ensures safer liquidity operations and improves code maintainability.

Checklist

  • Added four new custom errors
  • Updated LiquidityManager function signatures
  • Improved contract clarity and error handling

Closes #<issue_number_if_any>

@Neros0 Neros0 self-requested a review September 13, 2025 19:57
@Neros0 Neros0 added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 13, 2025
@Neros0 Neros0 merged commit e905f86 into CraftMeme:main Sep 13, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants